package com.ruoyi.quartz.task;

import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.quartz.service.IPlanBusService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import java.util.Date;

/**
 * 排班任务
 */
@Component("planTask")
public class PlanTask {

    @Autowired
    private IPlanBusService planBusService;

    public void planAm(Integer day) {
        //Date date = null;//测试，上线需屏蔽掉此部分代码
        Date date = DateUtils.getAfterTime(day);

        planBusService.plan("am", date);
    }

    public void planPm(Integer day) {
        Date date = DateUtils.getAfterTime(day);
        planBusService.plan("pm", date);
    }

}
